package com.rc.saas.tenant.vo.elec;


import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author frog
 * @date 2021/10/28
 */
public class PileOfflineVo {
    @ExcelIgnore
    private Long elecPileId;
    @ExcelProperty("桩群")
    private String stationName;
    @ExcelProperty("桩编号")
    private String pileNo;
    @ExcelProperty("电桩类型")
    private String pileElecType;
    @ExcelProperty("营业类型")
    private String bizType;
    @ExcelProperty("桩品牌")
    private String brandName;
    @ExcelProperty("桩运营状态")
    private String operateStatus;
    @ExcelProperty("桩群运营状态")
    private String stationOperateStatus;
    @ExcelProperty("当前状态")
    private String status;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("离线时间")
    private Date logoutTime;
    @ExcelProperty("离线次数")
    private Integer offlineCount;
    @ExcelProperty("离线时长")
    private String offlineTime;

    public String getBizType() {
        if ("0".equals(bizType)){
            return "自营";
        }else if ("1".equals(bizType)){
            return "非自营";
        }
        return bizType;
    }

    public void setBizType(String bizType) {
        this.bizType = bizType;
    }

    public String getPileElecType() {
        if ("1".equals(pileElecType)) {
            return "单直流";
        } else if ("2".equals(pileElecType)) {
            return "单交流";
        } else if ("3".equals(pileElecType)) {
            return "双直流";
        } else if ("4".equals(pileElecType)) {
            return "双交流";
        } else if ("5".equals(pileElecType)) {
            return "交直流一体";
        }
        return pileElecType;
    }

    public String getOperateStatus() {
        if ("0".equals(operateStatus)) {
            return "未上线";
        } else if ("1".equals(operateStatus)) {
            return "上线";
        } else if ("2".equals(operateStatus)) {
            return "下线";
        }
        return operateStatus;
    }

    public String getStationOperateStatus() {
        if ("0".equals(stationOperateStatus)) {
            return "未上线";
        } else if ("1".equals(stationOperateStatus)) {
            return "上线";
        } else if ("2".equals(stationOperateStatus)) {
            return "下线";
        }
        return stationOperateStatus;
    }

    public Long getElecPileId() {
        return elecPileId;
    }

    public void setElecPileId(Long elecPileId) {
        this.elecPileId = elecPileId;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getPileNo() {
        return pileNo;
    }

    public void setPileNo(String pileNo) {
        this.pileNo = pileNo;
    }

    public void setPileElecType(String pileElecType) {
        this.pileElecType = pileElecType;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public void setOperateStatus(String operateStatus) {
        this.operateStatus = operateStatus;
    }

    public void setStationOperateStatus(String stationOperateStatus) {
        this.stationOperateStatus = stationOperateStatus;
    }

    public Date getLogoutTime() {
        return logoutTime;
    }

    public void setLogoutTime(Date logoutTime) {
        this.logoutTime = logoutTime;
    }

    public String getStatus() {
        if ("0".equals(status)){
            return "离线";
        }else if ("1".equals(status)){
            return "在线";
        }
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getOfflineCount() {
        return offlineCount;
    }

    public void setOfflineCount(Integer offlineCount) {
        this.offlineCount = offlineCount;
    }

    public String getOfflineTime() {
        return offlineTime;
    }

    public void setOfflineTime(String offlineTime) {
        this.offlineTime = offlineTime;
    }

}
